<?php

declare(strict_types=1);

namespace App\Inventory\Model;

use Hyperf\Database\Model\SoftDeletes;
use Mine\MineModel;

/**
 * @property int $id ID
 * @property string $number 商品编号
 * @property string $name 商品名称
 * @property string $mark 牌号
 * @property string $state 状态
 * @property string $size 规格
 * @property string $unit 计重单位
 * @property string $goods_image 商品图片
 * @property int $min_inventory 最低库存重量
 * @property int $max_inventory 最高库存重量
 * @property float $raise_price 加价费用(元)
 * @property string $remark 备注
 * @property \Carbon\Carbon $created_at 创建时间
 * @property \Carbon\Carbon $updated_at 更新时间
 * @property string $deleted_at 删除时间
 * @property int $firmid 企业ID
 */
class InventoryGoods extends MineModel
{
    use SoftDeletes;
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'inventory_goods';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'number', 'name', 'mark', 'state', 'size', 'unit', 'goods_image', 'min_inventory', 'max_inventory', 'raise_price', 'remark', 'created_at', 'updated_at', 'deleted_at', 'firmid'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'min_inventory' => 'integer', 'max_inventory' => 'integer', 'raise_price' => 'float', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'firmid' => 'integer'];
}
